Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Won't show exception if cache driver is not supported #236

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

huzaifaarain
Copy link

Instead of throwing an exception, the configuration file explicitly mentioned the unsupported drivers, the package should gracefully handle it instead of throwing an exception.

Instead of throwing an exception, the configuration file explicitly mentioned the unsupported drivers, the package should gracefully handle it instead of throwing an exception.
@abbasmashaddy72
Copy link

I am using Dynamo_DB in AWS Lambda Trows same Exception Error:

This cache store does not support tagging.

This Below is the Stack Trace: Not Complete as Includes Confidential Info

BadMethodCallException:
This cache store does not support tagging.

  at /var/task/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:507
  at Illuminate\Cache\Repository->tags(array('torann-geoip-location'))
     (/var/task/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:429)
  at Illuminate\Cache\CacheManager->__call('tags', array(array('torann-geoip-location')))
     (/var/task/vendor/torann/geoip/src/Cache.php:32)
  at Torann\GeoIP\Cache->__construct(object(CacheManager), array('torann-geoip-location'), 30)
     (/var/task/vendor/torann/geoip/src/GeoIP.php:88)
  at Torann\GeoIP\GeoIP->__construct(array('log_failures' => true, 'include_currency' => true, 'service' => 'ipapi', 'services' => array('maxmind_database' => array('class' => 'Torann\\GeoIP\\Services\\MaxMindDatabase', 'database_path' => '/tmp/storage/app/geoip.mmdb', 'update_url' => 'https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=&suffix=tar.gz', 'locales' => array('en')), 'maxmind_api' => array('class' => 'Torann\\GeoIP\\Services\\MaxMindWebService', 'user_id' => null, 'license_key' => null, 'locales' => array('en')), 'ipapi' => array('class' => 'Torann\\GeoIP\\Services\\IPApi', 'secure' => true, 'key' => null, 'continent_path' => '/tmp/storage/app/continents.json', 'lang' => 'en'), 'ipgeolocation' => array('class' => 'Torann\\GeoIP\\Services\\IPGeoLocation', 'secure' => true, 'key' => null, 'continent_path' => '/tmp/storage/app/continents.json', 'lang' => 'en'), 'ipdata' => array('class' => 'Torann\\GeoIP\\Services\\IPData', 'key' => null, 'secure' => true), 'ipfinder' => array('class' => 'Torann\\GeoIP\\Services\\IPFinder', 'key' => null, 'secure' => true, 'locales' => array('en'))), 'cache' => 'all', 'cache_tags' => array('torann-geoip-location'), 'cache_expires' => 30, 'default_location' => array('ip' => '127.0.0.0', 'iso_code' => 'US', 'country' => 'United States', 'city' => 'New Haven', 'state' => 'CT', 'state_name' => 'Connecticut', 'postal_code' => '06510', 'lat' => 41.31, 'lon' => -72.92, 'timezone' => 'America/New_York', 'continent' => 'NA', 'default' => true, 'currency' => 'USD')), object(CacheManager))
     (/var/task/vendor/torann/geoip/src/GeoIPServiceProvider.php:37)
  at Torann\GeoIP\GeoIPServiceProvider->Torann\GeoIP\{closure}(object(Application), array())
     (/var/task/vendor/laravel/framework/src/Illuminate/Container/Container.php:908)
  at Illuminate\Container\Container->build(object(Closure))
     (/var/task/vendor/laravel/framework/src/Illuminate/Container/Container.php:795)
  at Illuminate\Container\Container->resolve('geoip', array(), true)
     (/var/task/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:957)
  at Illuminate\Foundation\Application->resolve('geoip', array())
     (/var/task/vendor/laravel/framework/src/Illuminate/Container/Container.php:731)
  at Illuminate\Container\Container->make('geoip', array())
     (/var/task/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:942)
  at Illuminate\Foundation\Application->make('geoip', array())
     (/var/task/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:120)
  at app('geoip')
     (/var/task/vendor/torann/geoip/src/helpers.php:14)
  at geoip()

@abbasmashaddy72
Copy link

@huzaifaarain May I know What will happen Exactly in the background Just for My Knowledge

Will we get the IP of User If exception is not shown as it is not supporting the tag cache?

@alies-dev
Copy link
Contributor

I experienced the issue and fixed in my fork: https://github.com/InteractionDesignFoundation/laravel-geoip/releases/tag/3.4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants